package com.project.fiveCerealsSavoury.domain;

public class Message {
	private String mess;
	private Order order;
	
	public Message(String mess) {
		super();
		this.mess = mess;
	}
	public Message(Order order) {
		super();
		this.order = order;
	}

	public String getMess() {
		return mess;
	}
	public void setMess(String mess) {
		this.mess = mess;
	}
	public Order getOrder() {
		return order;
	}
	public void setOrder(Order order) {
		this.order = order;
	}
	@Override
	public String toString() {
		return "Message [mess=" + mess + ", order=" + order + "]";
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((mess == null) ? 0 : mess.hashCode());
		result = prime * result + ((order == null) ? 0 : order.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Message other = (Message) obj;
		if (mess == null) {
			if (other.mess != null)
				return false;
		} else if (!mess.equals(other.mess))
			return false;
		if (order == null) {
			if (other.order != null)
				return false;
		} else if (!order.equals(other.order))
			return false;
		return true;
	}
	
}
